package com.daify.threadlearn.chapter01.order03;

/**
 * @author daify
 * @date 2019-06-17
 */
public class DeadLockTest {

    private Object one = new Object();

    private Object two = new Object();

    public void getOne () {
        synchronized (one) {
            synchronized (two) {
                //doSame
            }
        }
    }

    public void getTwo () {
        synchronized (two) {
            synchronized (one) {
                //doSame
            }
        }
    }
}
